package org.example.blog.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.blog.dto.UserDTO;
import org.example.blog.entity.User;
import org.example.blog.vo.UserVO;

@Mapper
public interface UserMapper {
    /**
     * 根据昵称查询用户
     * @param nickname
     * @return
     */
    @Select("select * from user where nickname = #{nickname}")
    //返回USer的id

    User selectByNickname(String nickname);

    /**
     * 插入新用户
     * @param newUser
     */
    void insertNewUser(UserDTO newUser);
}
